import Vue from 'vue'
import App from './App.vue'
import {routes} from "./router";
//引入路由
import VueRouter from 'vue-router'
//引入swiper
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'

//引入公用css
import '../public/base.css'


Vue.use(VueAwesomeSwiper)
//调用路由
Vue.use(VueRouter)
//解决路由初始化被多调用导致报错的问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
console.log(routes);
const router = new VueRouter ({
    routes,
    mode: 'history',
	// base:"/"
})
Vue.config.productionTip = false
new Vue({
  render: h => h(App),
   router,//诸如router
}).$mount('#app')
